import scrapy


class TcSpider(scrapy.Spider):
    name = "tc"
    allowed_domains = ["bj.58.com"]
    start_urls = ["https://bj.58.com/quanzhizhaopin/?key=%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91"]

    def parse(self, response):
        #字符串
        content = response.text
        #二进制数据
        content = response.body

        spans = response.xpath('//div[@class="job_name clearfix"]/a').extract()
        for job_name in spans:
            print(f"职位名称: {job_name}")
